package com.qgz.framework.web;

import java.util.HashMap;
import java.util.Map;

public abstract class ActionSupport {

	private Map<Object, Object> requestData;
	private Map<Object, Object> responseData;

	public abstract String execute();

	public void setRequestData(Object key, Object value) {
		this.getRequestData().put(key, value);
	}

	public Object getRequestData(Object key) {
		return this.getRequestData().get(key);
	}

	public Object getResponseData(Object key) {
		return this.getResponseData().get(key);
	}

	public void setResponseData(Object key, Object value) {
		this.getResponseData().put(key, value);
	}

	public ActionSupport() {
		this.setRequestData(new HashMap<Object, Object>());
		this.setResponseData(responseData = new HashMap<Object, Object>());
	}

	private Map<Object, Object> getRequestData() {
		return requestData;
	}

	private void setRequestData(Map<Object, Object> requestData) {
		this.requestData = requestData;
	}

	private Map<Object, Object> getResponseData() {
		return responseData;
	}

	private void setResponseData(Map<Object, Object> responseData) {
		this.responseData = responseData;
	}

}
